<?php
/**
 * Create By: PhpStorm
 * User: niechenguang
 * File: Circle.php
 * Date: 2017/1/2
 * Time: 21:45
 */

namespace app\api\controller;

use app\api\model\page\msg\ClearMsg;
use app\api\model\page\msg\GetMsgList;
use app\api\model\page\msg\GetMsgSet;
use app\api\model\page\msg\MsgIndex;
use app\api\model\page\msg\SendMsg;
use app\api\model\page\msg\SetMsgSet;
use think\Request;

class Msg
{

    protected $param;

    public function __construct()
    {
        $this->param = Request::instance()->param();
    }

    /**
     * 消息首页
     *
     * @return array
     */
    public function index()
    {
        $obj = new MsgIndex();
        return $obj->excute($this->param);
    }

    /**
     * 消息首页
     *
     * @return array
     */
    public function sendMsg()
    {
        $obj = new SendMsg();
        return $obj->excute($this->param);
    }

    /**
     * 消息首页
     *
     * @return array
     */
    public function clear()
    {
        $obj = new ClearMsg();
        return $obj->excute($this->param);
    }

    /**
     * 对话列表
     *
     * @return array
     */
    public function msgList()
    {
        $obj = new GetMsgList();
        return $obj->excute($this->param);
    }

    /**
     * 获取设置
     *
     * @return array
     */
    public function GetMsgSet()
    {
        $obj = new GetMsgSet();
        return $obj->excute($this->param);
    }

    /**
     * 设置
     *
     * @return array
     */
    public function SetMsgSet()
    {
        $obj = new SetMsgSet();
        return $obj->excute($this->param);
    }
}
